//
//  AboutUsViewController.m
//  WheatPlan
//
//  Created by 郑渊文 on 7/3/15.
//  Copyright (c) 2015 IOSTeam. All rights reserved.
//

#import "AboutUsViewController.h"

@interface AboutUsViewController ()

@end

@implementation AboutUsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initSubViews];
    self.view.backgroundColor = [UIColor whiteColor];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
    // Dispose of any resources that can be recreated.
}


-(void)initSubViews
{
    self.navigationItem.title = @"关于我们";
    [self.navigationController.navigationBar setTranslucent:NO];//设置navigationbar的半透明
    [self.navigationController.navigationBar setBarTintColor:[GetFileModel colorWithHexString:@"#34bd81" alpha:1]];
    [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,nil]];

    self.view.backgroundColor = [UIColor clearColor];
    
    //自定义左右按钮
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setBackgroundImage:[UIImage imageNamed:@"_0000_返回.png"]
     
                      forState:UIControlStateNormal];
    
    [button addTarget:self action:@selector(back)
     
     forControlEvents:UIControlEventTouchUpInside];
    
    button.frame = CGRectMake(0, 0, 20, 15);
    
    
    
    UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
    
    
    
    self.navigationItem.leftBarButtonItem = menuButton;
    

    
    
    UILabel *introduceLable = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, SCREEN_WIDTH-20, 60)];
    introduceLable.numberOfLines = 0;
    introduceLable.textColor = [UIColor blackColor];
    //    introduceLable.backgroundColor = [UIColor yellowColor];
    introduceLable.font = [UIFont fontWithName:@"Helvetica" size:13];
    
NSString *text = @"金华麦苗教育科技有限公司成立于2012年，是一家致力于研究和发展婴幼儿早教的创业型发展公司，主要定位是以园所为载体，以互联网为媒介，为园所提供专业化的教学管理系统，以及培训服务体系，为家长提供个性化的养育指导方案，为孩子构建家庭、园所、第三方专业教育机构有机结合的360°全方位成长环境。同时，面向社会，以线下上门服务为基础，为中国家庭提供符合孩子成长规律、面向未来的个性养育方案。—让孩子实现个性绽放、成长为最好的自己！";
    UIFont *font = [UIFont fontWithName:@"Helvetica" size:13.0];
    CGSize size = [text sizeWithFont:font constrainedToSize:CGSizeMake(SCREEN_WIDTH-20, 2000.0f)
                       lineBreakMode:NSLineBreakByWordWrapping];
    CGRect rect = introduceLable.frame;
    rect.size = size;
    [introduceLable setFrame:rect];
    [introduceLable setText:text];
    float heig = rect.size.height;
    
    
    UIScrollView *bgView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
    bgView.contentSize = CGSizeMake(SCREEN_WIDTH, heig+100);
    [self.view addSubview:bgView];
    bgView.backgroundColor = [UIColor whiteColor];
    [bgView addSubview:introduceLable];

}

-(void)back
{
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
